#主动技能【踏前斩】
#目标实体添加3s冷却时间
execute rotated ~ 0 positioned ^ ^0.2 ^3.1 run scoreboard players add @e[type=!player,distance=..3,sort=nearest,limit=1] yasuo3 3

#技能效果：位移
execute rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @e[distance=..3,scores={yasuo3=3}] positioned ^ ^-0.2 ^-3.1 run tp @s ^ ^0.1 ^5.5 facing entity @e[type=!player,distance=0.1..5,limit=1,sort=nearest] feet
execute rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @a[distance=..3,scores={yasuo3=-1}] positioned ^ ^-0.2 ^-3.1 run tp @s ^ ^0.1 ^5.5 facing entity @a[distance=0.1..5,limit=1,sort=nearest] feet

#判断目标为<实体>时【斩钢闪】是否冷却完成，给予自身特殊【斩钢闪】
execute if score @s yasuo2 matches 1 rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @e[distance=..3,scores={yasuo3=3}] run clear @s diamond_sword
execute if score @s yasuo2 matches 1 rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @e[distance=..3,scores={yasuo3=3}] run clear @s crossbow
execute if score @s yasuo2 matches 1 rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @e[distance=..3,scores={yasuo3=3}] run item replace entity @s weapon.mainhand with minecraft:diamond_sword{Damage: 1561, AttributeModifiers: [{Operation: 0, Amount: +4.5d, UUID: [I; 639849521, 480263735, -308424048, 90477916], Slot: mainhand, AttributeName: "generic.attack_damage", Name: "generic.attackDamage"}, {Operation: 0, Amount: +5.0d, UUID: [I; 579321202, 920236951, -282948704, 751615532], Slot: mainhand, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}], display: {Name: '[{"text":"旋风斩钢闪","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]'}, Enchantments: [{id: "minecraft:sweeping", lvl: 1}, {id: "minecraft:smite", lvl: 5}]} 1

# /tp @s ^ ^ ^5 facing ~ ~ ~
#判断目标为<玩家>时【斩钢闪】是否冷却完成，给予自身特殊【斩钢闪】
execute if score @s yasuo2 matches 1 rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @a[distance=..3,scores={yasuo3=-1}] run clear @s diamond_sword
execute if score @s yasuo2 matches 1 rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @a[distance=..3,scores={yasuo3=-1}] run clear @s crossbow
execute if score @s yasuo2 matches 1 rotated ~ 0 positioned ^ ^0.2 ^3.1 if entity @a[distance=..3,scores={yasuo3=-1}] run item replace entity @s weapon.mainhand with minecraft:diamond_sword{Damage: 1561, AttributeModifiers: [{Operation: 0, Amount: +4.5d, UUID: [I; 639849521, 480263735, -308424048, 90477916], Slot: mainhand, AttributeName: "generic.attack_damage", Name: "generic.attackDamage"}, {Operation: 0, Amount: +5.0d, UUID: [I; 579321202, 920236951, -282948704, 751615532], Slot: mainhand, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}], display: {Name: '[{"text":"旋风斩钢闪","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]'}, Enchantments: [{id: "minecraft:sweeping", lvl: 1}, {id: "minecraft:smite", lvl: 5}]} 1

#
scoreboard players set @p[distance=0.1..,gamemode=!spectator,scores={yasuo3=-1}] yasuo3 6
scoreboard players reset @s skIron_sword1
scoreboard players set @s skCDJPG 1
